﻿@model List<Project_KhuyenMaiVang.Models.DonDatHang>
@{
    ViewBag.Title = "DanhSachDonDatHang";
    Layout = "~/Views/Shared/_LayoutDoanhNghiep.cshtml";
}
<table width="750" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td colspan="6" class="TieuDeTheTable">
            <div align="center">
                DANH SÁCH ĐƠN ĐẶT HÀNG</div>
        </td>
    </tr>
    <tr>
    <td>
        &nbsp;
        </td>
    </tr>
    <tr>
        <td width="125" bgcolor="#84B152">
            STT
        </td>
        <td width="150" bgcolor="#84B152">
            Tên sản phẩm
        </td>
        <td width="160" bgcolor="#84B152">
            Người mua
        </td>
        <td width="120" bgcolor="#84B152">
            Số lượng
        </td>
        <td width="84" bgcolor="#84B152">
            Tình trạng đơn hàng
        </td>
    </tr>
    @{int count = 0;}
    @for (int i = 0; i < Model.Count; i++)
    {
        count++;
        if (Model[i].TinhTrangDonHang == "Đã xử lý")
        {
        <tr>
            <td bgcolor="#44FF88">
                @count.ToString()
            </td>
            <td bgcolor="#44FF88">
                @Model[i].TenSanPham
            </td>
            <td bgcolor="#44FF88">
                @Model[i].NguoiDatHang
            </td>
            <td bgcolor="#44FF88">
                @Model[i].SoLuong
            </td>
            <td bgcolor="#44FF88">
                @Model[i].TinhTrangDonHang
            </td>
        </tr>
        }
        else
        {
            <tr>
            <td bgcolor="#843300">
                @count.ToString()
            </td>
            <td bgcolor="#843300">
                @Model[i].TenSanPham
            </td>
            <td bgcolor="#843300">
                @Model[i].NguoiDatHang
            </td>
            <td bgcolor="#843300">
                @Model[i].SoLuong
            </td>
            <td bgcolor="#843300">
                @Model[i].TinhTrangDonHang
            </td>
        </tr>
        }
    }
</table>
